שאלות מתוך הראיון |
Given an array of 2 integer arrays representing x,y
coordinates, write a function to calculate the S amount of closest points to origin (0,0).For example: [[1,2], [3,5], [-1,1], [7,9]],
if we would want to get the 2 closest points to origin the output would be: [1,2], [-1,1] |
|